{extend name="apps/common/view/front.tpl" /}
<!-- -->
{block name="header_meta"}
<title>{:lang('user/center/index')}</title>
{/block}
<!-- -->
{block name="header"}{include file="widget/header" /}{/block}
<!-- -->
{block name="main"}
<div class="container pt-2">
<div class="row row-1">
  <div class="col-12 col-md-2 px-1">
    {include file="widget/sitebar" /}
  </div>
  <div class="col-12 col-md-10 px-1">
    <div class="card">
    <div class="card-header h5">用户资料</div>
    <div class="card-body">
      <table class="table table-bordered bg-white mb-0">
        <tbody>
          <tr>
            <td>TOKEN</td>
            <td>{$user.user_token} <a class="text-purple" href="{:DcUrl('api/token/update')}" data-toggle="get">更换</a></td>
          </tr>
          <tr>
            <td>渠道ID</td>
            <td>{$user.user_id}</td>
          </tr>
          <tr>
            <td>积分</td>
            <td>{$user.user_score|default="0"} <a class="text-purple" href="{:DcUrl('user/recharge/index')}">充值</a></td>
          </tr>
          <tr>
            <td>用户名</td>
            <td>{$user.user_name}</td>
          </tr>
          <tr>
            <td>手机</td>
            <td>{$user.user_mobile}{if in_array('user_mobile',$captcha_list)}<a class="text-purple ml-1" href="{:DcUrl('user/mobile/index')}" data-toggle="get">{$user.user_mobile?'修改':'设置'}</a>{/if}</td>
          </tr>
          <tr>
            <td>邮箱</td>
            <td>{$user.user_email}{if in_array('user_email',$captcha_list)}<a class="text-purple ml-1" href="{:DcUrl('user/email/index')}" data-toggle="get">{$user.user_email?'修改':'设置'}</a>{/if}</td>
          </tr>
          <tr>
            <td>角色</td>
            <td>{foreach $user['user_capabilities'] as $group} {$group|lang}{/foreach}</td>
          </tr>
          <tr>
            <td>状态</td>
            <td>{$user.user_status_text}</td>
          </tr>
          <tr>
            <td>呢称</td>
            <td>{$user.user_nice_name|default='未设置'}</td>
          </tr>
          <tr>
            <td>后缀</td>
            <td>{$user.user_slug|default='未设置'}</td>
          </tr>
          <tr>
            <td>兴趣</td>
            <td>{$user.user_tag|default='未设置'}</td>
          </tr>
          <tr>
            <td>签名</td>
            <td>{$user.user_sign|default='未设置'}</td>
          </tr>
          <tr>
            <td>令牌过期</td>
            <td>{$user.user_expire|date='Y-m-d H:i:s',###}</td>
          </tr>
          <tr>
            <td>最近登录</td>
            <td>{$user.user_update_time}</td>
          </tr>
        </tbody>
      </table>
    </div> 
  </div>
  </div> <!--col-12 end-->
</div> <!-- row end-->
</div> <!-- /container -->
<script>$('.dc-modal').attr('data-backdrop','static');</script>
{/block}
<!-- -->
{block name="footer"}{include file="widget/footer" /}{/block}